#ifndef __ML_WORLD_H__
#define __ML_WORLD_H__
#include "aircraft.h"
#include <SFML/Window.hpp>
#include <array>
class World : private sf::NonCopyable {
public :
	explicit World(sf::RenderWindow& window);
	void update(sf::Time dt);
	void draw();
	CommandQueue& getCommandQueue() { return mCommandQueue; }

private :
	void loadTextures();
	void buildScene();

private:
	enum class Layer {
		BackGround,
		Air,
		LayerCount
	};

private:
	sf::RenderWindow&                                              mWindow;
	sf::View                                                       mWorldView;
	TextureManager                                                 mTextures;
	SceneNode                                                      mSceneGraph;
	std::array<SceneNode*, static_cast<size_t>(Layer::LayerCount)> mSceneLayers;
	
	sf::FloatRect                                                  mWorldBounds;
	sf::Vector2f                                                   mSpawnPosition;
	float                                                          mScrollSpeed;
	Aircraft*                                                      mPlayerAircraft;
	CommandQueue                                                   mCommandQueue;
};

#endif